using Godot;

public partial class HitBox : Area3D
{
    public void AttackEnemy()
    {

    }

    private void OnBodyEntered(Node3D body)
    {
        if (body != null && body.HasMethod("CanBeAttack"))
        {
            GD.Print("击中物体"+body.Name);
            
            EnemyController enemy =  body as EnemyController;
            enemy.Dead();
        }
    }
}
